<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

                    <div class="row">
                        <div class="col-md-12">
                            <div class="nav-tabs-custom">
                                <ul class="nav nav-tabs">
                                    <li <?php if($tab=="common") echo 'class="active"';?>><?php echo anchor('backend/configuration/basic', '基本设置'); ?></li>
                                    <li <?php if($tab=="ship") echo 'class="active"';?>><?php echo anchor('backend/configuration/ship','物流设置'); ?></li>
                                </ul>
                                <div class="tab-content">
                                    <?php if($tab=="common"):?>
                                    <div class="tab-pane active" id="tab_admin">
                                        <?php echo $message_admin; ?>

                                        <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-sysconfig_admin')); ?>

                                   
                                            
                                            
                                             <!--
                    
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">关闭提现</label>
                                                <div class="col-sm-10">
                                                    <label class="radio-inline">
                                                        <input type="radio" name="with_close" id="with_close1" value="1" <?php echo set_value('with_close', $with_close) == 1 ? 'checked' : NULL; ?>> <?php echo strtoupper(lang('actions_yes')); ?>
                                                    </label>
                                                    <label class="radio-inline">
                                                        <input type="radio" name="with_close" id="with_close0" value="0" <?php echo set_value('with_close', $with_close) == 0 ? 'checked' : NULL; ?>> <?php echo strtoupper(lang('actions_no')); ?>
                                                    </label>
                                                </div>
                                            </div>
                                            
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">红包金额设置</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($bouns);?>
                                                    <span class="help-block">不同金额用,隔开</span>
                                                </div>
                                            </div>
                                        
                                            
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">参与人数设置</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($persons);?>
                                                    <span class="help-block">不同人数用,隔开</span>
                                                </div>
                                            </div>
                                            
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">客服链接</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($kf);?>
                                                    <span class="help-block"></span>
                                                </div>
                                            </div>
                                            
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">默认关闭时间</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($auto_close);?>
                                                    <span class="help-block">超过设置的分钟数，红包自动取消，金额退还用户余额</span>
                                                </div>
                                            </div>
                                            -->

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">本地图片URL</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($urlpath);?>
                                                    <span class="help-block"></span>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">Vultr密钥</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($vultr);?>
                                                    <span class="help-block"></span>
                                                </div>
                                            </div>

                                            

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">翻译KEY</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($apikey);?>
                                                    <span class="help-block">谷歌翻译密钥</span>
                                                </div>
                                            </div>


                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">标题废词<br/>纯英文</label>
                                           <div class="col-sm-10">
                                                 <?php echo form_textarea($remove_keyword,$remove_keywordvalue);?>
                                                 <span class="help-block">请用换行分隔</span>
                                           </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">标题废词<br/>词组，数字，符号</label>
                                           <div class="col-sm-10">
                                                 <?php echo form_textarea($remove_dot,$remove_dotvalue);?>
                                                 <span class="help-block">请用换行分隔</span>
                                           </div>
                                        </div>


                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">速卖通分类</label>
                                           <div class="col-sm-10">
                                                 <?php echo form_textarea($expresscategory,$expresscategory_val);?>
                                                 <span class="help-block">请用换行分隔</span>
                                           </div>
                                        </div>
                                            <div class="form-group">
                                                <div class="col-sm-offset-2 col-sm-10">
                                                    <div class="btn-group">
                                                        <?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => lang('actions_submit'))); ?>
                                                    </div>
                                                </div>
                                            </div>
                                        <?php echo form_close();?>
                                    </div>


                                    <?php endif;?>
                                    <?php if($tab=="ship"):?>
                                    <div class="tab-pane active" id="tab_ship">
                                        <?php echo $message_admin; ?>

                                        <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-sysconfig_admin')); ?>



                                        <div class="form-group">
                                                <label class="col-sm-2 control-label">物流接口</label>
                                                <div class="col-sm-10">
                                                    <label class="radio-inline">
                                                        <input type="radio" name="shiptype" id="shiptype0" value="0" <?php echo set_value('shiptype', $config["shiptype"]) == 0 ? 'checked' : NULL; ?> onclick="$('#sfconfig').hide();"> 关闭物流
                                                    </label>
                                                    <label class="radio-inline">
                                                        <input type="radio" name="shiptype" id="shiptype1" value="1" <?php echo set_value('shiptype', $config["shiptype"]) == 1 ? 'checked' : NULL; ?> > 顺丰物流
                                                    </label>
                                                </div>
                                            </div>

                                            <div id="sfconfig" style="<?php
                                        if($config["shiptype"]==1)
                                            echo "display:block";
                                        else
                                            echo "display:none";
                                        ?>
                                        ">
                                    

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">顺丰API ID</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($sfapiid);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">顺丰API KEY</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($sfapikey);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>
                                       
                                        </div>


                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">Tracking More API KEY</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($trackapikey);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>
                                       

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">寄件人公司</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($defsendercom);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">寄件人姓名</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($defsendername);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>

                                            
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">寄件人手机号</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($defsenderphone);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">寄件人省份</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($defsenderprovince);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>

                                            
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">寄件人城市</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($defsendercity);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">寄件人地址</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($defsenderaddress);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>
                                            
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">寄件人邮编</label>
                                                <div class="col-sm-10">
                                                    <?php echo form_input($defsenderpost);?>
                                                    <span class="help-block"> </span>
                                                </div>
                                            </div>





                                            <div class="form-group">
                                                <div class="col-sm-offset-2 col-sm-10">
                                                    <div class="btn-group">
                                                        <?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => lang('actions_submit'))); ?>
                                                    </div>
                                                </div>
                                            </div>
                                        <?php echo form_close();?>
                                    </div>

                                    <script>
                                        $("#shiptype0").on('ifChecked', function(event){
                                            $('#sfconfig').hide();
                                        });
                                        $("#shiptype1").on('ifChecked', function(event){
                                            $('#sfconfig').show();
                                        });
                                    </script>

                                    <?php endif;?>
                                </div>
                            </div>
                        </div>
                    </div>
              